part of '../index.dart';

class ImGitfModel {
  int? id;
  String? name;
  double? price;
  String? objectUrl;
  String? previewUrl;
  String? objectGifUrl;
  int? colorType;
  String? remarkUrl;
  String? objectVapUrl;
  double? pipiPrice;
  int? sort;
  int? type;
  String? classic;
  String? giftBox;
  String? activityExt;
  String? priceDesc;

  ImGitfModel({
    this.id,
    this.name,
    this.price,
    this.objectUrl,
    this.previewUrl,
    this.objectGifUrl,
    this.colorType,
    this.remarkUrl,
    this.objectVapUrl,
    this.pipiPrice,
    this.sort,
    this.type,
    this.classic,
    this.giftBox,
    this.activityExt,
    this.priceDesc,
  });

  ImGitfModel.fromJson(Map<String, dynamic> json) {
    id = int.tryParse('${json['id']}');
    name = json['name'];
    price = double.tryParse('${json['price']}');
    objectUrl = json['objectUrl'];
    previewUrl = json['previewUrl'];
    objectGifUrl = json['objectGifUrl'];
    colorType = int.tryParse('${json['colorType']}');
    remarkUrl = json['remarkUrl'];
    objectVapUrl = json['objectVapUrl'];
    pipiPrice = json['pipiPrice'];
    sort = int.tryParse('${json['sort']}');
    type = int.tryParse('${json['type']}');
    classic = json['classic'];
    giftBox = json['giftBox'];
    activityExt = json['activityExt'];
    priceDesc = json['priceDesc'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['name'] = name;
    data['price'] = price;
    data['objectUrl'] = objectUrl;
    data['previewUrl'] = previewUrl;
    data['objectGifUrl'] = objectGifUrl;
    data['colorType'] = colorType;
    data['remarkUrl'] = remarkUrl;
    data['objectVapUrl'] = objectVapUrl;
    data['pipiPrice'] = pipiPrice;
    data['sort'] = sort;
    data['type'] = type;
    data['classic'] = classic;
    data['giftBox'] = giftBox;
    data['activityExt'] = activityExt;
    data['priceDesc'] = priceDesc;
    return data;
  }
}
